package com.iwuyc.tools.commons.util.math;

import com.iwuyc.tools.commons.util.ObjectUtils;

import java.math.BigDecimal;

/**
 * {@link java.math.BigDecimal} 工具类
 *
 * @author Neil
 */
public class BigDecimalUtils {

    private BigDecimalUtils() {
    }


    public static boolean eq(BigDecimal one, BigDecimal another) {
        final BigDecimal innerOne = ObjectUtils.nullOrDefault(one, BoundaryNumber.MIN_NUM);
        final BigDecimal innerAnother = ObjectUtils.nullOrDefault(another, BoundaryNumber.MIN_NUM);
        return innerOne.compareTo(innerAnother) == 0;
    }
}
